﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Admin_Article.aspx.cs" Inherits="Admin_Admin_Article" %>

<%@ Register Assembly="XControl" Namespace="XControl" TagPrefix="XCL" %>
<%@ Register assembly="FredCK.FCKeditorV2" namespace="FredCK.FCKeditorV2" tagprefix="FCKeditorV2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>无标题页</title>
</head>
<body>
	<form id="form1" runat="server">
	<div>
		<XCL:XFormView ID="XFormView1" runat="server" AutoRefreshXGridView="True" DataSourceID="ObjectDataSource2"
			Width="770px" DefaultMode="Edit" onitemcommand="XFormView1_ItemCommand" 
			onitemupdated="XFormView1_ItemUpdated">
			<EditItemTemplate>
				<div id="XFormView1_Edit" class="XFormView">
					<div class="Row">
						<div class="Item">
							<div class="ItemName">
								编号：</div>
							<div class="ItemValue">
								<asp:Label ID="IDLabel" runat="server" Text='<%# Bind("ID") %>' />
							</div>
						</div>
					</div>
					<div class="Row">
						<div class="Item">
							<div class="ItemName">
								栏目：</div>
							<div class="ItemValue">
								<asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="ObjectDataSource1"
									DataTextField="BoardName" DataValueField="ID" SelectedValue='<%# Bind("BoardID") %>'>
								</asp:DropDownList>
								<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" OldValuesParameterFormatString="original_{0}"
									SelectMethod="SelectAll" TypeName="XCMSData.Board">
									<SelectParameters>
										<asp:Parameter Name="name" Type="String" />
										<asp:Parameter Name="value" Type="Object" />
										<asp:Parameter Name="startRowIndex" Type="Int32" />
										<asp:Parameter Name="maximumRows" Type="Int32" />
									</SelectParameters>
								</asp:ObjectDataSource>
							</div>
						</div>
						<div class="Item">
							<div class="ItemName">
								专题：</div>
							<div class="ItemValue">
								<asp:DropDownList ID="DropDownList2" runat="server" AppendDataBoundItems="True" DataSourceID="ObjectDataSource1"
									DataTextField="BoardName" DataValueField="ID" SelectedValue='<%# Bind("BoardID2") %>'>
									<asp:ListItem Value="0">不属于任何专题</asp:ListItem>
								</asp:DropDownList>
							</div>
						</div>
					</div>
					<div class="Row">
						<div class="Item">
							<div class="ItemName">
								标题：</div>
							<div class="ItemValue" style="width: 520px;">
								<asp:TextBox ID="TitleNameTextBox" runat="server" Text='<%# Bind("TitleName") %>'
									Width="500px" />
							</div>
						</div>
					</div>
					<div class="Row">
						<div class="Item">
							<div class="ItemName">
								作者：</div>
							<div class="ItemValue">
								<asp:TextBox ID="AuthorTextBox" runat="server" Text='<%# Bind("Author") %>' />
							</div>
						</div>
						<div class="Item">
							<div class="ItemName">
								录入者：</div>
							<div class="ItemValue">
								<asp:TextBox ID="UserNameTextBox" runat="server" Text='<%# Bind("UserName") %>' />
							</div>
						</div>
						<div class="Item">
							<div class="ItemName">
								编辑：</div>
							<div class="ItemValue">
								<asp:TextBox ID="EditorTextBox" runat="server" Text='<%# Bind("Editor") %>' />
							</div>
						</div>
					</div>
					<div class="Row">
						<div class="Item">
							<div class="ItemName">
								关键字：</div>
							<div class="ItemValue">
								<asp:TextBox ID="KeyWordTextBox" runat="server" Text='<%# Bind("KeyWord") %>' />
							</div>
						</div>
						<div class="Item">
							<div class="ItemName">
								来源：</div>
							<div class="ItemValue">
								<asp:TextBox ID="CopyFromTextBox" runat="server" Text='<%# Bind("CopyFrom") %>' />
							</div>
						</div>
						<div class="Item">
							<div class="ItemName">
								点击数：</div>
							<div class="ItemValue">
								<XCL:NumberBox ID="HitsNumberBox" runat="server" Text='<%# Bind("Hits") %>' />
							</div>
						</div>
					</div>
					<div class="Row">
						<div class="Item">
							<div class="ItemName">
								生成时间：</div>
							<div class="ItemValue">
								<XCL:DateBox ID="CreateTimeDateBox" runat="server" Text='<%# Bind("CreateTime", "{0:yyyy-MM-dd HH:mm:ss}") %>' />
							</div>
						</div>
						<div class="Item">
							<div class="ItemName">
								更新时间：</div>
							<div class="ItemValue">
								<XCL:DateBox ID="UpdateTimeDateBox" runat="server" Text='<%# Bind("UpdateTime", "{0:yyyy-MM-dd HH:mm:ss}") %>' />
							</div>
						</div>
					</div>
					<div class="Row">
						<div class="Item">
							<div class="ItemName">
								固顶：</div>
							<div class="ItemValue">
								<div class="XFormView_ItemValue">
									<XCL:IntCheckBox ID="IsTopIntCheckBox" runat="server" Value='<%# Bind("IsTop") %>' />
								</div>
							</div>
						</div>
						<div class="Item">
							<div class="ItemName">
								推荐：</div>
							<div class="ItemValue">
								<div class="XFormView_ItemValue">
									<XCL:IntCheckBox ID="IsEliteIntCheckBox" runat="server" Value='<%# Bind("IsElite") %>' />
								</div>
							</div>
						</div>
						<div class="Item">
							<div class="ItemName">
								状态：</div>
							<div class="ItemValue">
								<XCL:NumberBox ID="StatusNumberBox" runat="server" Text='<%# Bind("Status") %>' />
							</div>
						</div>
					</div>
					<div class="Row" style="height: 400px;">
						<div class="Item" style="height: 400px;">
							<div class="ItemName">
								内容：</div>
							<div class="ItemValue" style="width: 690px; height: 500px;">
	<FCKeditorV2:FCKeditor ID="FCKeditor1" runat="server" 
		Value='<%# Bind("Content") %>' Height="400px">
	</FCKeditorV2:FCKeditor>
							</div>
						</div>
					</div>
					<div class="Foot">
						<div style="float: left">
							<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="true" CommandName="Update"
								Text="更新" />
						</div>
						<div style="width: 5px; float: left">
						</div>
						<div style="float: left">
							<asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="false" CommandName="Cancel"
								Text="取消" />
						</div>
					</div>
				</div>
			</EditItemTemplate>
			<InsertItemTemplate>
				<div id="XFormView1_Inst" class="XFormView">
					<div class="Row">
						<div class="Item">
							<div class="ItemName">
								栏目：</div>
							<div class="ItemValue">
								<asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="ObjectDataSource1"
									DataTextField="BoardName" DataValueField="ID" SelectedValue='<%# Bind("BoardID") %>'>
								</asp:DropDownList>
								<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" OldValuesParameterFormatString="original_{0}"
									SelectMethod="SelectAll" TypeName="XCMSData.Board">
									<SelectParameters>
										<asp:Parameter Name="name" Type="String" />
										<asp:Parameter Name="value" Type="Object" />
										<asp:Parameter Name="startRowIndex" Type="Int32" />
										<asp:Parameter Name="maximumRows" Type="Int32" />
									</SelectParameters>
								</asp:ObjectDataSource>
							</div>
						</div>
						<div class="Item">
							<div class="ItemName">
								专题：</div>
							<div class="ItemValue">
								<asp:DropDownList ID="DropDownList2" runat="server" AppendDataBoundItems="True" DataSourceID="ObjectDataSource1"
									DataTextField="BoardName" DataValueField="ID" SelectedValue='<%# Bind("BoardID2") %>'>
									<asp:ListItem Value="0">不属于任何专题</asp:ListItem>
								</asp:DropDownList>
							</div>
						</div>
					</div>
					<div class="Row">
						<div class="Item">
							<div class="ItemName">
								标题：</div>
							<div class="ItemValue" style="width: 520px;">
								<asp:TextBox ID="TitleNameTextBox" runat="server" Text='<%# Bind("TitleName") %>'
									Width="500px" />
							</div>
						</div>
					</div>
					<div class="Row">
						<div class="Item">
							<div class="ItemName">
								作者：</div>
							<div class="ItemValue">
								<asp:TextBox ID="AuthorTextBox" runat="server" Text='<%# Bind("Author") %>' />
							</div>
						</div>
						<div class="Item">
							<div class="ItemName">
								录入者：</div>
							<div class="ItemValue">
								<asp:TextBox ID="UserNameTextBox" runat="server" Text='<%# Bind("UserName") %>' />
							</div>
						</div>
						<div class="Item">
							<div class="ItemName">
								编辑：</div>
							<div class="ItemValue">
								<asp:TextBox ID="EditorTextBox" runat="server" Text='<%# Bind("Editor") %>' />
							</div>
						</div>
					</div>
					<div class="Row">
						<div class="Item">
							<div class="ItemName">
								关键字：</div>
							<div class="ItemValue">
								<asp:TextBox ID="KeyWordTextBox" runat="server" Text='<%# Bind("KeyWord") %>' />
							</div>
						</div>
						<div class="Item">
							<div class="ItemName">
								来源：</div>
							<div class="ItemValue">
								<asp:TextBox ID="CopyFromTextBox" runat="server" Text='<%# Bind("CopyFrom") %>' />
							</div>
						</div>
						<div class="Item">
							<div class="ItemName">
								点击数：</div>
							<div class="ItemValue">
								<XCL:NumberBox ID="HitsNumberBox" runat="server" Text='<%# Bind("Hits") %>' />
							</div>
						</div>
					</div>
					<div class="Row">
						<div class="Item">
							<div class="ItemName">
								生成时间：</div>
							<div class="ItemValue">
								<XCL:DateBox ID="CreateTimeDateBox" runat="server" Text='<%# Bind("CreateTime", "{0:yyyy-MM-dd HH:mm:ss}") %>' />
							</div>
						</div>
						<div class="Item">
							<div class="ItemName">
								更新时间：</div>
							<div class="ItemValue">
								<XCL:DateBox ID="UpdateTimeDateBox" runat="server" Text='<%# Bind("UpdateTime", "{0:yyyy-MM-dd HH:mm:ss}") %>' />
							</div>
						</div>
					</div>
					<div class="Row">
						<div class="Item">
							<div class="ItemName">
								固顶：</div>
							<div class="ItemValue">
								<div class="XFormView_ItemValue">
									<XCL:IntCheckBox ID="IsTopIntCheckBox" runat="server" Value='<%# Bind("IsTop") %>' />
								</div>
							</div>
						</div>
						<div class="Item">
							<div class="ItemName">
								推荐：</div>
							<div class="ItemValue">
								<div class="XFormView_ItemValue">
									<XCL:IntCheckBox ID="IsEliteIntCheckBox" runat="server" Value='<%# Bind("IsElite") %>' />
								</div>
							</div>
						</div>
						<div class="Item">
							<div class="ItemName">
								状态：</div>
							<div class="ItemValue">
								<XCL:NumberBox ID="StatusNumberBox" runat="server" Text='<%# Bind("Status") %>' />
							</div>
						</div>
					</div>
					<div class="Row">
						<div class="Item">
							<div class="ItemName">
								内容：</div>
							<div class="ItemValue" style="width: auto">
	<FCKeditorV2:FCKeditor ID="FCKeditor1" runat="server" 
		Value='<%# Bind("Content") %>'>
	</FCKeditorV2:FCKeditor>
							</div>
						</div>
					</div>
					<div class="Foot">
						<div style="float: left">
							<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="true" CommandName="Update"
								Text="更新" />
						</div>
						<div style="width: 5px; float: left">
						</div>
						<div style="float: left">
							<asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="false" CommandName="Cancel"
								Text="取消" />
						</div>
					</div>
				</div>
			</InsertItemTemplate>
			<EmptyDataTemplate>
				<asp:LinkButton ID="LinkButton1" runat="server" CommandName="New">新增标题</asp:LinkButton>
			</EmptyDataTemplate>
		</XCL:XFormView>
		<asp:ObjectDataSource ID="ObjectDataSource2" runat="server" DataObjectTypeName="XCMSData.Title"
			InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="FindByKey"
			TypeName="XCMSData.Title" UpdateMethod="Update">
			<SelectParameters>
				<asp:QueryStringParameter Name="__ID" QueryStringField="TitleID" Type="Int32" />
			</SelectParameters>
		</asp:ObjectDataSource>
	</div>
	</form>
</body>
</html>
